function xs_zlnd_submit() {
    var begin_date = document.getElementById('begin_date').value;
    var end_date = document.getElementById('end_date').value;
    var sensor = $('#sensor').val();
    var warning = $('#warning').prop('checked');
    var warningFlag = warning;
    var sensorString = "";
    if (begin_date == '') {
        alert('请输入起始日期');
        return;
    }
    if (end_date == '') {
        alert('请输入结束日期');
        return;
    }
    if (sensor == '') {
        alert('请选择传感器');
        return;
    }
    if (dateCompare(begin_date, end_date) == 1) {
        alert("请注意起止时间顺序");
        return;
    }
    //这里开始显示loading.gif
    var $result_pic = $("#result_pic");
    $result_pic.addClass('in');
    $result_pic.empty();
    $result_pic.prepend('<img src="img/loading.gif" ></img>');
    disabled();
    $.each(sensor, function(i, item) {
        if (i == 0) {
            sensorString = item.toString();
        } else
            sensorString = sensorString + "," + item.toString();
    });
    $.ajax({
        url: 'mainbeamDeflection.php',
        data: {
            beginDate: begin_date,
            endDate: end_date,
            sensor: sensorString,
            warning: warning
        },
        success: function(data) {
            console.log("xs_zlnd ajax successed");
            // $.each(data.data,function (i,item) {
            //     paintPic(data.data[i],'mainBeamDeflection');
            // })
            if (data.status == true) {
                $("#result_pic img").remove();
                paintPic(data.data, 'mainBeamDeflection', warningFlag);
            } else {
                if (data.msg == "login") {
                    //window.location.href='login.html';
                } else {
                    alert(data.msg);
                }
            }

        },
        error: function() {
            console.log("xs_zlnd ajax failed")
        },
        complete: function() {
            console.log('xs_zlnd ajax completed');
            enabled();
        }
    })

}